bitkeeper revision 1.1108.33.23 (410d0a8aWM5n48Ku4nUKCSOzCx9B2A)
authorcl349@freefall.cl.cam.ac.uk <cl349@freefall.cl.cam.ac.uk>
Sun, 1 Aug 2004 15:21:46 +0000 (15:21 +0000)
committercl349@freefall.cl.cam.ac.uk <cl349@freefall.cl.cam.ac.uk>
Sun, 1 Aug 2004 15:21:46 +0000 (15:21 +0000)
sync with 2.4 block backend driver:
always print error messages

linux-2.6.7-xen-sparse/drivers/xen/blkback/common.h
linux-2.6.7-xen-sparse/drivers/xen/blkback/vbd.c

index 9fa93813cc1d6c17a7478b4a4aa7e78f0d7b9595..dc4bcf072871a9c9780f8544af2ca7b9c36f0349 100644 (file)
@@ -36,6 +36,9 @@
 #define DPRINTK(_f, _a...) ((void)0)
 #endif
 
+#define PRINTK(_f, _a...) printk(KERN_ALERT "(file=%s, line=%d) " _f, \
+                           __FILE__ , __LINE__ , ## _a )
+
 typedef struct blkif_st {
     /* Unique identifier for this interface. */
     domid_t          domid;
index bda17b17528e14386346ac1174027280d1574234..540a8c1f3b95a87378a9f21f39bbdc9c94aa8af5 100644 (file)
@@ -20,7 +20,7 @@ void vbd_create(blkif_be_vbd_create_t *create)
     blkif = blkif_find_by_handle(create->domid, create->blkif_handle);
     if ( unlikely(blkif == NULL) )
     {
-        DPRINTK("vbd_create attempted for non-existent blkif (%u,%u)\n", 
+        PRINTK("vbd_create attempted for non-existent blkif (%u,%u)\n", 
                 create->domid, create->blkif_handle); 
         create->status = BLKIF_BE_STATUS_INTERFACE_NOT_FOUND;
         return;
@@ -43,7 +43,7 @@ void vbd_create(blkif_be_vbd_create_t *create)
         }
         else
         {
-            DPRINTK("vbd_create attempted for already existing vbd\n");
+            PRINTK("vbd_create attempted for already existing vbd\n");
             create->status = BLKIF_BE_STATUS_VBD_EXISTS;
             goto out;
         }
@@ -51,7 +51,7 @@ void vbd_create(blkif_be_vbd_create_t *create)
 
     if ( unlikely((vbd = kmalloc(sizeof(vbd_t), GFP_KERNEL)) == NULL) )
     {
-        DPRINTK("vbd_create: out of memory\n");
+        PRINTK("vbd_create: out of memory\n");
         create->status = BLKIF_BE_STATUS_OUT_OF_MEMORY;
         goto out;
     }
@@ -89,7 +89,7 @@ void vbd_grow(blkif_be_vbd_grow_t *grow)
     blkif = blkif_find_by_handle(grow->domid, grow->blkif_handle);
     if ( unlikely(blkif == NULL) )
     {
-        DPRINTK("vbd_grow attempted for non-existent blkif (%u,%u)\n", 
+        PRINTK("vbd_grow attempted for non-existent blkif (%u,%u)\n", 
                 grow->domid, grow->blkif_handle); 
         grow->status = BLKIF_BE_STATUS_INTERFACE_NOT_FOUND;
         return;
@@ -111,7 +111,7 @@ void vbd_grow(blkif_be_vbd_grow_t *grow)
 
     if ( unlikely(vbd == NULL) || unlikely(vbd->vdevice != vdevice) )
     {
-        DPRINTK("vbd_grow: attempted to append extent to non-existent VBD.\n");
+        PRINTK("vbd_grow: attempted to append extent to non-existent VBD.\n");
         grow->status = BLKIF_BE_STATUS_VBD_NOT_FOUND;
         goto out;
     } 
@@ -119,7 +119,7 @@ void vbd_grow(blkif_be_vbd_grow_t *grow)
     if ( unlikely((x = kmalloc(sizeof(blkif_extent_le_t), 
                                GFP_KERNEL)) == NULL) )
     {
-        DPRINTK("vbd_grow: out of memory\n");
+        PRINTK("vbd_grow: out of memory\n");
         grow->status = BLKIF_BE_STATUS_OUT_OF_MEMORY;
         goto out;
     }
@@ -138,7 +138,7 @@ void vbd_grow(blkif_be_vbd_grow_t *grow)
 #if 0
     if( !blk_size[MAJOR(x->extent.device)] )
     {
-        DPRINTK("vbd_grow: device %08x doesn't exist.\n", x->extent.device);
+        PRINTK("vbd_grow: device %08x doesn't exist.\n", x->extent.device);
        grow->status = BLKIF_BE_STATUS_EXTENT_NOT_FOUND;
        goto out;
     }
@@ -149,7 +149,7 @@ void vbd_grow(blkif_be_vbd_grow_t *grow)
 
     if ( x->extent.sector_start > 0 )
     {
-        DPRINTK("vbd_grow: device %08x start not zero!\n", x->extent.device);
+        PRINTK("vbd_grow: device %08x start not zero!\n", x->extent.device);
        grow->status = BLKIF_BE_STATUS_EXTENT_NOT_FOUND;
        goto out;
     }
@@ -251,7 +251,7 @@ void vbd_destroy(blkif_be_vbd_destroy_t *destroy)
     blkif = blkif_find_by_handle(destroy->domid, destroy->blkif_handle);
     if ( unlikely(blkif == NULL) )
     {
-        DPRINTK("vbd_destroy attempted for non-existent blkif (%u,%u)\n", 
+        PRINTK("vbd_destroy attempted for non-existent blkif (%u,%u)\n", 
                 destroy->domid, destroy->blkif_handle); 
         destroy->status = BLKIF_BE_STATUS_INTERFACE_NOT_FOUND;
         return;